package com.david.iagent;


import com.david.location_utility.PhysicalLocationUtility;

import android.location.Location;

public class AgentData {
	protected static String name, code, phone, fax, email, company, description, like, address;
    protected double lat, lng= 0;
    
    protected volatile PhysicalLocationUtility physicalLocation = new PhysicalLocationUtility();
    private final float[] distanceArray = new float[1];

	public AgentData(String name, String code, String phone, String fax, String email, String company, 
			String description, String like, String address) 
	{
		set(name, code, phone, fax, email, company, description, like, address);
	}
	public synchronized void set(String name, String code, String phone, String fax, String email, String company, 
			String description, String like, String address){
		this.name = name;
		this.code = code;
		this.phone = phone;
		this.fax = fax;
		this.email = email;
		this.company = company;
		this.description = description;
		this.like = like;
		this.address = address;
		// 9 columns
	}
	public synchronized void setLocation(double lat, double lng){
		this.lat = lat;
		this.lng = lng;
	}
	public synchronized void calutaleDistance (Location location){
        Location.distanceBetween(physicalLocation.getLatitude(), physicalLocation.getLongitude(), location.getLatitude(), location.getLongitude(), distanceArray);

	}
}
